package com.yueshop.ware.feign;

import com.yueshop.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("yueshop-product") //yueshop-gateway
public interface ProductFeignService {

    /**
     * 网关路由
     *@FeignClient("yueshop-gateway")
     *  @RequestMapping("/api/product/skuinfo/info/{skuId}")
     * 直接让后台指定服务处理
     *  @FeignClient("yueshop-product")
     *   @RequestMapping("/product/skuinfo/info/{skuId}")
     */
    @RequestMapping("/product/skuinfo/info/{skuId}")
    R info(@PathVariable("skuId") Long skuId);
}
